flutter read file

95

Future<File> get _localFile async {
  final path = await _localPath;
  return File('$path/counter.txt');
}
Future<File> writeCounter(int counter) async {
  final file = await _localFile;

  // Write the file.
  return file.writeAsString('$counter');
}

Comments

Submit
0 Comments